package com.chouxiaozi.gperadvice;

public class Test {
    public static void main(String[] args) {
        GPer gPer = new GPer();
        Question question = new Question();
        question.setUserName("小明");
        question.setContent("观察者设计模式适用于哪些场景？");

        Teacher tom = new Teacher("Tom");
        gPer.addObserver(tom);
        gPer.publishQuestion(question);
    }
}
